home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / os / 4.2bsd / Imakefile < prev    next >
Encoding:
Makefile  |  1989-12-18  |  3.4 KB  |  120 lines

  1. #include <Server.tmpl>
  2.  
  3. /*
  4.  * If you have any extra files to be put into the library, define them here.
  5.  * Note that System V boxes should use os/sysV to get Berklib.c.
  6.  */
  7.  
  8. #ifdef HPArchitecture
  9. #define OtherSources hpsocket.c 
  10. #define OtherObjects hpsocket.o dbm.o 
  11. #endif
  12.  
  13. /*
  14.  * do not modify the following two definitions
  15.  */
  16.  
  17. #ifndef OtherSources
  18. #define OtherSources
  19. #endif
  20.  
  21. #ifndef OtherObjects
  22. #define OtherObjects
  23. #endif
  24.  
  25. #if HasDESLibrary
  26. DESDEFS = -DHASDES
  27. DESOBJS = xdmauth.o
  28. DESSRCS = xdmauth.c
  29. #else
  30. DESDEFS = 
  31. DESOBJS =
  32. DESSCRS =
  33. #endif
  34.  
  35. BOOTSTRAPCFLAGS = 
  36.            SRCS = WaitFor.c access.c connection.c fonttype.c io.c oscolor.c \
  37.                   osfonts.c osinit.c utils.c auth.c mitauth.c $(DESSRCS) \
  38.            xdmcp.c OtherSources
  39.            OBJS = WaitFor.o access.o connection.o fonttype.o io.o oscolor.o \
  40.                   osfonts.o osinit.o utils.o auth.o mitauth.o $(DESOBJS) \
  41.            xdmcp.o OtherObjects
  42.    FONT_DEFINES = FontDefines FontFilters
  43. #if SpecialMalloc
  44.      OS_DEFINES = -DSPECIAL_MALLOC
  45. #else
  46.      OS_DEFINES =
  47. #endif /* SpecialMalloc */
  48.     DBM_DEFINES = NdbmDefines
  49.         DEFINES = ConnectionFlags $(OS_DEFINES) $(DESDEFS)
  50.        INCLUDES = -I.  -I../../include -I$(INCLUDESRC) -I$(TOP)/lib/Xau
  51.     EXT_DEFINES = ExtensionDefines
  52.        LINTLIBS = ../../dix/llib-ldix.ln
  53.  
  54. #ifdef HPArchitecture
  55.          DBMLIB = /usr/lib/libdbm.a
  56.     XLIBSYSVDIR = $(TOP)/lib/X/sysV
  57. #endif /* HPArchitecture */
  58.  
  59. #ifdef NEED_ALLOCA_FROM_LIBPW
  60.           PWLIB = /lib/libPW.a
  61. #endif /* NEED_ALLOCA_FROM_LIBPW */
  62.  
  63. NormalLibraryObjectRule()
  64. NormalLibraryTarget(os,$(OBJS))
  65. LintLibraryTarget(os,$(SRCS))
  66. NormalLintTarget($(SRCS))
  67.  
  68. # these depend on ConnectionFlags
  69. access.o: $(ICONFIGFILES)
  70. connection.o: $(ICONFIGFILES)
  71.  
  72. #ifdef HPArchitecture
  73. /**/#
  74. /**/# The following kludge is necessary because dbm already has a global 
  75. /**/# routine named "bcopy" that is implemented in a silly way.  So, we have to 
  76. /**/# extract the objects from the library, force the bcopy routine to be 
  77. /**/# local to the one file, put the result into a temporary file, rename the 
  78. /**/# temporary file to its proper name, and link it together with everything
  79. /**/# else to form the object file that we link into the server.
  80. /**/#
  81. #ifdef hp9000s300
  82. dbm.o:  $(DBMLIB)
  83.     rm -f dbm.o
  84.     if [ ! -d dbm ]; then $(RM) -r dbm; mkdir dbm; else /bin/true; fi
  85.     (cd dbm; rm -f *.o; ar -x $(DBMLIB); \
  86.     ld -r -o a.out.o -h _bcopy ndbm.o; \
  87.     mv a.out.o ndbm.o; ld -r -o ../dbm.o *.o)
  88. #else
  89. dbm.o:  $(DBMLIB)
  90.         rm -f dbm.o
  91.         if [ ! -d dbm ]; then $(RM) -r dbm; mkdir dbm; else /bin/true; fi
  92.         (cd dbm; rm -f *.o; ar -x $(DBMLIB); \
  93.         ld -r -o a.out.o -h bcopy ndbm.o; \
  94.         mv a.out.o ndbm.o; ld -r -o ../dbm.o *.o)
  95. #endif /* hp9000s300 */
  96. #endif /* HPArchitecture */
  97.  
  98. #ifdef NEED_ALLOCA_FROM_LIBPW
  99. /**/#
  100. /**/# And this one is to get the version of alloca that lives in /lib/libPW.a
  101. /**/# without getting all of the rest of the stuff in there.
  102. /**/#
  103. alloca.o:  $(PWLIB)
  104.     rm -f alloca.o
  105.     ar x $(PWLIB) alloca.o
  106. #endif /* NEED_ALLOCA_FROM_LIBPW */
  107.  
  108. SpecialObjectRule(osinit.o, $(ICONFIGFILES), -DADMPATH=\"$(ADMDIR)/X\%smsgs\" $(DBM_DEFINES))
  109. SpecialObjectRule(WaitFor.o, $(ICONFIGFILES), $(EXT_DEFINES))
  110. SpecialObjectRule(fonttype.o, $(ICONFIGFILES), $(FONT_DEFINES))
  111. SpecialObjectRule(oscolor.o, $(ICONFIGFILES), $(DBM_DEFINES))
  112.  
  113. #if HasSaberC
  114. saber_src:
  115.     /**/#load $(CFLAGS) -DADMPATH=\"$(ADMDIR)/X\%smsgs\" $(EXT_DEFINES) \
  116.         $(FONT_DEFINES) $(SRCS)
  117. #endif
  118.  
  119. DependTarget()
  120.